<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>05 sessionStorage</title>
</head>

<body>


    <script>
        window.localStorage.name = '小黑';
        window.localStorage['userName'] = '隔壁老王';
        window.localStorage.setItem('kky', 'kisskillyou111');

        var a = sessionStorage.name;
        console.log('a:', a);
    </script>
</body>

</html>